package com.guoguo.mapper;

import com.guoguo.entity.Favorite;
import com.guoguo.entity.vo.FavoriteVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

/**
 * Created by KLSD on 2017/9/13.
 */
public interface FavoriteMapper {


    /**
     * 添加收藏
     */
    int insert(Favorite favorite);

    /**
     * 查询收藏对象
     *
     * @param favorite
     * @return
     */
    List<Favorite> getFavoriteByIds(Favorite favorite);

    /**
     * 取消收藏的图片
     *
     * @param imgId
     * @return
     */
    int deletedImage(@Param("imgId") List<String> imgId, @Param("userId") String userId);


    int deletedFavorite(Map<String, Object> ids);

    /**
     * 取消收藏的专辑
     *
     * @param albId
     * @param userId
     * @return
     */
    int deletedAlbum(@Param("albId") List<String> albId, @Param("userId") String userId);

    List<FavoriteVO> getAlbumList(@Param("userId") String userId, int pageNum, int pageSize);

    List<FavoriteVO> getImageList(@Param("userId") String userId, int pageNum, int pageSize);
}
